Limits problem 03.mws

1. Piecewise defined functions.

Some interesting things occur when you evaluate limits of piecewise defined functions. In Maple, an example of a piecewise defined function is:

> f:= x->piecewise(x<-1,-x^3,x>-1,(x+2)^2,x=-1,`undefined`);

f := proc (x) options operator, arrow; piecewise(x ...

> f(x);

PIECEWISE([-x^3, x < -1],[(x+2)^2, -1 < x],[undefin...

We plot the function over the domain x = 0 .. 2 .

> plot(f(x),x=-2..1,y=0..8,thickness=2);

[Maple Plot]

Look up the command in Maple, and use it to define the piecewise function f in the Submission section. Plot the function f over a domain which illustrates the piecewise nature of the function definition. You will want to use the option discont=true for this plot. What this option does is to inform Maple to watch out for "discontinuities" or " jumps" in the graph.

Submission:

Use piecewise to plot the piecewise defined function f(x) = x^2-2*x+2 if x is less than 1 , and f(x) = 3-x if x is greater than or equal to 1 , then:

(a) Find limit(f(x),x = 1,left) and limit(f(x),x = 1,right) .

(b) Does limit(f(x),x = 1) exist?

Submission worksheet:

 

2. Continuity.

Define the function f in Maple by

> f := x-> piecewise(x < 0,x^2+.1e-3,0 <= x,x^2-.1e-3);

f := proc (x) options operator, arrow; piecewise(x ...

> f(x);

PIECEWISE([x^2+.1e-3, x < 0],[x^2-.1e-3, 0 <= x])

From the following graph, we might guess that the limit as of f(x) is 0.

> plot(f(x),x=-1..1);

[Maple Plot]

We want to see what epsilon - delta definition of the limit will say about this educated guess.  Choose epsilon = `0.1` and plot to find a delta such that if abs(x-0) < delta , then abs(f(x)-0) < epsilon . Then do the same thing for epsilon = .1e-1 , .001, .0001, etc. If the limit does not exist, then for some epsilon , you won't be able to find a delta .  We do the case epsilon = `0.1` for you, where by trial and error we found that delta = `0.32` seems to work.

> epsilon:=0.1;delta:=.32;plot([-epsilon,epsilon,f(x)],x=-delta..delta,color=[red,red,blue],axes=boxed);

epsilon := .1

delta := .32

[Maple Plot]

Submission:

Plots like the one above for epsilon =0.1, 0.05, 0.001, 0.0005, etc. If for some epsilon we cannot find a delta , then the limit is not 0. Explain this last point carefully.  Also, answer these questions:
 

(a) What is the left hand limit as x = 0 ?
(b) What is the right hand limit at
x = 0 ?
(c) Is
f continuous from the right at x = 0 ?
(d) Is
f continuous from the left at x = 0 ?
(e) Is
f continuous at x = 0 ?

Submission worksheet:

 

3. Using Maple to study continuity.

The function given by the rule

> f:=x->(x^2-1)/(x-1);

f := proc (x) options operator, arrow; (x^2-1)/(x-1...

is not defined at x = 1 , as we can check in Maple.

> f(1);

Error, (in f) numeric exception: division by zero

Nevertheless, we can extend the definition of the function by defining f(1) to be equal to a certain value which will make the function continuous.

To investigate which value we should use to extend the function to make it continuous at x = 1 , we can evaluate the limit, either graphically, as

> plot(f,0..2);

[Maple Plot]

from which it appears that the value f(1) = 2 will extend it to a continuous function, or we can evaluate the limit using Maple.

> limit(f(x),x=1);

2

Whenever limit(f(x),x = a) = L exists, we can define f(a) = L , and the function so redefined will be continuous at x = a . Thus the function given by

> f:=x->piecewise(x<>1,(x^2-1)/(x-1),x=1,2);

f := proc (x) options operator, arrow; piecewise(x ...

> f(x);

PIECEWISE([(x^2-1)/(x-1), x <> 1],[2, x = 1])

will be continuous at x = 1 because Limit(f(x),x = 1) = f(1) . Let us check that with Maple.

> limit(f(x),x=1);

2

However, due to a bug in Maple's evaluation of the piecewise function, it does not evaluate f(1) correctly.

> f(1);

Error, (in f) numeric exception: division by zero

This type of error is not too common in Maple, but it does illustrate that you have to keep your eyes open whenever you are using a piece of software, because you don't know exactly how it works, and so can't be sure that it is always correct.

Submission:

Use the method outlined above to study the following functions. (There is no zoom and trace feature in Maple, so try to estimate the limits by clicking on the point on the graph and looking at the left top part of the screen, where the approximate coordinates of the point will appear. Then compare your estimates with the exact values given by the limit command)

(a) f[1](x) = (x^4-81)/(x-3) , x[0] = 3

(b) f[2](x) = (5*x^3+9*x^2)/(2*x^5+3*x^2) , x[0] = 0

(c) f[3](x) = sin(2*x)/3*x , x[0] = 0

(d) f[4](x) = x*(1-cos(x))/(x-sin(x)) , x[0] = 0

Submission worksheet: